package com.example.hzly.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.hzly.entity.RouteDestination;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RouteDestinationMapper extends BaseMapper<RouteDestination> {

    @Select("SELECT * FROM route_destination WHERE route_id = #{routeId}")
    List<RouteDestination> selectByRouteId(@Param("routeId") Long routeId);

    @Select("SELECT * FROM route_destination WHERE destination_id = #{destinationId}")
    List<RouteDestination> selectByDestinationId(@Param("destinationId") Long destinationId);
}